package com.hsc.yalebao.tabChongZhi;

import android.annotation.SuppressLint;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
import android.content.res.Resources;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.text.Editable;
import android.text.SpannableString;
import android.text.TextWatcher;
import android.text.style.ForegroundColorSpan;
import android.util.DisplayMetrics;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.View.OnFocusChangeListener;
import android.view.ViewGroup;
import android.view.ViewGroup.LayoutParams;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.EditText;
import android.widget.GridView;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.PopupWindow;
import android.widget.PopupWindow.OnDismissListener;
import android.widget.RelativeLayout;
import android.widget.ScrollView;
import android.widget.TextView;
import com.google.gson.Gson;
import com.hsc.yalebao.adapter.ChongZJinEGridViewAdapter;
import com.hsc.yalebao.base.ActivityStack;
import com.hsc.yalebao.base.BaseFragment;
import com.hsc.yalebao.base.CustomApplication;
import com.hsc.yalebao.base.MainActivity;
import com.hsc.yalebao.base.MainWebActivity;
import com.hsc.yalebao.http.AppConstants;
import com.hsc.yalebao.http.RequestNet;
import com.hsc.yalebao.merchant.activity.PayUtils;
import com.hsc.yalebao.model.GetOauthUserStateBase;
import com.hsc.yalebao.model.GetTransBankRateBean;
import com.hsc.yalebao.model.NoticeBaseModel;
import com.hsc.yalebao.model.PayTypeBean;
import com.hsc.yalebao.model.PayTypeListBean;
import com.hsc.yalebao.model.ReChargeBaseData;
import com.hsc.yalebao.model.UserBaseBean;
import com.hsc.yalebao.tabIndex.CustomServiceActivity;
import com.hsc.yalebao.tools.SharedPreferencesUtil;
import com.hsc.yalebao.tools.UiUtil;
import com.hsc.yalebao.weight.ChongzhitishiDialog;
import com.hsc.yalebao.weight.LogUtils;
import com.hsc.yalebao.weight.MyDialog1;
import com.zhy.http.okhttp.callback.StringCallback;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import okhttp3.Call;

@SuppressLint({"NewApi"})
public class ChongZhiFragment extends BaseFragment
  implements View.OnClickListener
{
  public static ChongZhiFragment fragment;
  private String TAG = "ChongZhiFragment";
  private ImageView btn_zf;
  private Button btn_zf_confirm;
  private Button btn_zf_confirm1;
  private Calendar calendar;
  private ChongZJinEGridViewAdapter chongZJinEGridViewAdapter;
  private ChongzhitishiDialog chongzhitishiDialog;
  private CheckBox ck_weixin;
  private CheckBox ck_weixin3;
  private CheckBox ck_xieyi_new;
  private CheckBox ck_zaixinzf;
  private CheckBox ck_zaixinzf2;
  private CheckBox ck_zhifubao;
  private CheckBox ck_zhifubao2;
  private CheckBox ck_zhifubao3;
  private View contentView;
  private EditText edit_jin_e;
  private EditText edit_jin_e1;
  private EditText edit_register_introduce_new;
  private EditText edit_register_nickname_new;
  private EditText edit_register_psw_new;
  private EditText edit_register_rppsw_new;
  private EditText edit_register_username_new;
  private String guid = "";
  private int[] ids = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
  private ImageView img_register_new;
  boolean isInstalled = true;
  private boolean isWeixin = true;
  private boolean isWeixin3 = true;
  private boolean isYinlian = false;
  private boolean isZhifuBao = true;
  private boolean isZhifuBao3 = true;
  private ImageView iv_chongzhi_jilu;
  private ImageView iv_kefu;
  private RelativeLayout layout_weixin;
  private RelativeLayout layout_weixin3;
  private RelativeLayout layout_zaixianzf;
  private RelativeLayout layout_zhifubao;
  private RelativeLayout layout_zhifubao2;
  private RelativeLayout layout_zhifubao3;
  private LinearLayout lin_huodong_text;
  private LinearLayout lin_personal_info;
  private LinearLayout ll_xianxia_weixin;
  private LinearLayout ll_xianxia_yinhang;
  private LinearLayout ll_xianxia_zhifubao;
  private LinearLayout mBottomLay;
  private TextView mLoadingTv;
  private String mLoginType = "1";
  private ImageView mWeixinLine;
  private ImageView mWeixinLine3;
  private LinearLayout mXianXiaLay;
  private TextView mXianXiaTv;
  private LinearLayout mXianshangLay;
  private TextView mXianshangTv;
  private ImageView mXxWeixinLine;
  private ImageView mXxYinlianLine;
  private ImageView mXxZhifubaoLine;
  private RelativeLayout mYinLian2;
  private ImageView mYinlianLine;
  private ImageView mYinlianLine1;
  private ImageView mYinlianLine2;
  private ImageView mZhifubaoLine;
  private ImageView mZhifubaoLine2;
  private ImageView mZhifubaoLine3;
  private String money = "100";
  private MyDialog1 myDialog1 = null;
  private ArrayList<NoticeBaseModel> noticeListChongZhi = new ArrayList();
  private String payID;
  private List<Integer> payIds = new ArrayList();
  private List<Integer> payIds2 = new ArrayList();
  private String registerIntroduceIdNew = "";
  private String registerNickNameNew = "";
  private String registerUserNameNew = "";
  private String registerUserPswNew = "";
  private String registerUserPswRpNew = "";
  private String registerpid;
  private int screenHeigth;
  private int screenWidth;
  private ScrollView scroll_register_new;
  private int state = 0;
  private TextWatcher textWatcher = new TextWatcher()
  {
    public void afterTextChanged(Editable paramAnonymousEditable)
    {
    }

    public void beforeTextChanged(CharSequence paramAnonymousCharSequence, int paramAnonymousInt1, int paramAnonymousInt2, int paramAnonymousInt3)
    {
    }

    public void onTextChanged(CharSequence paramAnonymousCharSequence, int paramAnonymousInt1, int paramAnonymousInt2, int paramAnonymousInt3)
    {
      try
      {
        if (Integer.parseInt(ChongZhiFragment.this.edit_jin_e1.getText().toString().trim()) > 5000000)
          ChongZhiFragment.this.edit_jin_e1.setText("5000000");
        return;
      }
      catch (Exception localException)
      {
      }
    }
  };
  private TextView text_name;
  private TextView tv_forget_pwd_new;
  private TextView tv_go_register_new;
  private TextView tv_lianxi_kefu_new;
  private TextView tv_user_con_psw_tishi_new;
  private TextView tv_user_name_tishi_new;
  private TextView tv_user_nick_name_tishi_new;
  private TextView tv_user_psw_tishi_new;
  private TextView tv_xieyi_new;
  View viewRegisterNew;
  private PopupWindow window;
  private PopupWindow window1;
  PopupWindow window_register_new;
  int zhifuType = 1;
  String zhifuTypeStr = "支付宝";

  private void ChangeUserInfo()
  {
    this.registerUserNameNew = this.edit_register_username_new.getText().toString();
    this.registerUserPswNew = this.edit_register_psw_new.getText().toString();
    this.registerUserPswRpNew = this.edit_register_rppsw_new.getText().toString();
    this.registerNickNameNew = this.edit_register_nickname_new.getText().toString();
    this.registerIntroduceIdNew = this.edit_register_introduce_new.getText().toString();
    this.registerpid = this.edit_register_introduce_new.getText();
    if ("".equals(this.registerUserNameNew))
    {
      this.tv_user_name_tishi_new.setText("请输入您的账号");
      this.edit_register_username_new.requestFocus();
      this.scroll_register_new.fullScroll(33);
      this.img_register_new.setEnabled(true);
      return;
    }
    if (!UiUtil.isValidUserName(this.registerUserNameNew))
    {
      this.tv_user_name_tishi_new.setText("账号需要6~12位字母或数字");
      this.edit_register_username_new.requestFocus();
      this.img_register_new.setEnabled(true);
      return;
    }
    if ("".equals(this.registerUserPswNew))
    {
      this.tv_user_psw_tishi_new.setText("请输入您的密码");
      this.edit_register_psw_new.requestFocus();
      this.img_register_new.setEnabled(true);
      return;
    }
    if (this.registerUserNameNew.equals(this.registerUserPswNew))
    {
      this.tv_user_psw_tishi_new.setText("账号和密码不能一致");
      this.edit_register_psw_new.requestFocus();
      this.img_register_new.setEnabled(true);
      return;
    }
    if (!this.registerUserPswNew.equals(this.registerUserPswRpNew))
    {
      this.tv_user_con_psw_tishi_new.setText("两次密码不一致");
      this.edit_register_rppsw_new.requestFocus();
      this.img_register_new.setEnabled(true);
      return;
    }
    if ("".equals(this.registerIntroduceIdNew))
      this.registerIntroduceIdNew = "0";
    if (!this.ck_xieyi_new.isChecked())
    {
      this.myDialog1.setMessage("请阅读并同意《注册协议》");
      this.myDialog1.show();
      this.myDialog1.btn_confirm.setOnClickListener(new View.OnClickListener()
      {
        public void onClick(View paramAnonymousView)
        {
          ChongZhiFragment.this.myDialog1.dismiss();
        }
      });
      this.img_register_new.setEnabled(true);
      return;
    }
    this.tv_user_name_tishi_new.setText("");
    this.tv_user_psw_tishi_new.setText("");
    this.tv_user_con_psw_tishi_new.setText("");
    this.tv_user_nick_name_tishi_new.setText("");
    HashMap localHashMap = new HashMap();
    localHashMap.put("user_name", this.registerUserNameNew);
    localHashMap.put("password", this.registerUserPswRpNew);
    localHashMap.put("pid", this.registerIntroduceIdNew);
    localHashMap.put("guid", this.guid);
    RequestNet.get(getActivity(), AppConstants.URL_GET_CHANGEUSERINFO, localHashMap, new StringCallback()
    {
      public void onError(Call paramAnonymousCall, Exception paramAnonymousException)
      {
        LogUtils.e(ChongZhiFragment.this.TAG, "获取失败ChangeUserInfo()-result:" + paramAnonymousException);
        ChongZhiFragment.this.img_register_new.setEnabled(true);
      }

      public void onResponse(String paramAnonymousString)
      {
        ChongZhiFragment.this.img_register_new.setEnabled(true);
        Gson localGson = new Gson();
        try
        {
          localGetOauthUserStateBase = (GetOauthUserStateBase)localGson.fromJson(paramAnonymousString, GetOauthUserStateBase.class);
          if (localGetOauthUserStateBase == null)
            return;
        }
        catch (Exception localException)
        {
          GetOauthUserStateBase localGetOauthUserStateBase;
          do
          {
            while (true)
            {
              localException.printStackTrace();
              localGetOauthUserStateBase = null;
            }
            if (localGetOauthUserStateBase.getFlag() == -4)
            {
              ActivityStack.getInstance().backToMain(MainActivity.class, ChongZhiFragment.this.getActivity());
              return;
            }
            if (localGetOauthUserStateBase.getFlag() == 0)
            {
              ChongZhiFragment.this.myDialog1.setMessage(localGetOauthUserStateBase.getMsg());
              ChongZhiFragment.this.myDialog1.show();
              ChongZhiFragment.this.myDialog1.btn_confirm.setOnClickListener(new View.OnClickListener()
              {
                public void onClick(View paramAnonymous2View)
                {
                  ChongZhiFragment.this.myDialog1.dismiss();
                }
              });
              return;
            }
            if (localGetOauthUserStateBase.getFlag() == 1)
            {
              ChongZhiFragment.this.state = 0;
              UiUtil.showToast(ChongZhiFragment.this.getActivity(), "绑定成功");
              CustomApplication.app.userBaseBean.setUser_name(ChongZhiFragment.this.registerUserNameNew);
              CustomApplication.app.preferencesUtil.setValue(AppConstants.LOGIN_USERNAME, ChongZhiFragment.this.registerUserNameNew);
              CustomApplication.app.preferencesUtil.setValue(AppConstants.LOGIN_PWD, ChongZhiFragment.this.registerUserPswNew);
              ChongZhiFragment.this.window_register_new.dismiss();
            }
            if (localGetOauthUserStateBase.getFlag() == -2)
            {
              MainActivity.mainActivity.showOffLineDialog();
              return;
            }
          }
          while (localGetOauthUserStateBase.getFlag() != -3);
          MainActivity.mainActivity.showFengjinDialog();
        }
      }
    });
  }

  private void checkZhifu(List<PayTypeBean> paramList)
  {
    this.payIds2 = new ArrayList();
    Iterator localIterator;
    if ((paramList != null) && (paramList.size() > 0))
    {
      localIterator = paramList.iterator();
      if (localIterator.hasNext());
    }
    else
    {
      if (this.zhifuType != 8)
        break label244;
      if (this.payIds2.contains(Integer.valueOf(8)))
        break label167;
      this.myDialog1 = new MyDialog1(getActivity());
      this.myDialog1.setMessage("此充值方式已关闭,请返回选择其他充值方式");
      this.myDialog1.btn_confirm.setOnClickListener(new View.OnClickListener()
      {
        public void onClick(View paramAnonymousView)
        {
          ChongZhiFragment.this.myDialog1.dismiss();
        }
      });
      this.myDialog1.show();
    }
    label167: label244: 
    do
    {
      while (true)
      {
        return;
        PayTypeBean localPayTypeBean = (PayTypeBean)localIterator.next();
        try
        {
          int i = Integer.valueOf(localPayTypeBean.getIsSdkEffective()).intValue();
          this.payIds2.add(Integer.valueOf(i));
        }
        catch (Exception localException4)
        {
        }
      }
      break;
      String str3 = this.edit_jin_e1.getText().toString().trim();
      try
      {
        if ("".equals(str3))
        {
          UiUtil.showToast(getActivity(), "请填写您的充值金额");
          return;
        }
      }
      catch (Exception localException3)
      {
        localException3.printStackTrace();
        return;
      }
      if (Integer.parseInt(str3) < 10)
      {
        UiUtil.showToast(getActivity(), "充值金额最低10元");
        return;
      }
      getPay("yinlian", str3);
      return;
      if (this.zhifuType == 4)
      {
        if (!this.payIds2.contains(Integer.valueOf(4)))
        {
          this.myDialog1 = new MyDialog1(getActivity());
          this.myDialog1.setMessage("此充值方式已关闭,请返回选择其他充值方式");
          this.myDialog1.btn_confirm.setOnClickListener(new View.OnClickListener()
          {
            public void onClick(View paramAnonymousView)
            {
              ChongZhiFragment.this.myDialog1.dismiss();
            }
          });
          this.myDialog1.show();
          return;
        }
        String str2 = this.edit_jin_e1.getText().toString().trim();
        try
        {
          if ("".equals(str2))
          {
            UiUtil.showToast(getActivity(), "请填写您的充值金额");
            return;
          }
        }
        catch (Exception localException2)
        {
          localException2.printStackTrace();
          return;
        }
        if (Integer.parseInt(str2) < 10)
        {
          UiUtil.showToast(getActivity(), "充值金额最低10元");
          return;
        }
        getPay("yinlian", str2);
        return;
      }
    }
    while (this.zhifuType != 5);
    if (!this.payIds2.contains(Integer.valueOf(5)))
    {
      this.myDialog1 = new MyDialog1(getActivity());
      this.myDialog1.setMessage("此充值方式已关闭,请返回选择其他充值方式");
      this.myDialog1.btn_confirm.setOnClickListener(new View.OnClickListener()
      {
        public void onClick(View paramAnonymousView)
        {
          ChongZhiFragment.this.myDialog1.dismiss();
        }
      });
      this.myDialog1.show();
      return;
    }
    String str1 = this.edit_jin_e1.getText().toString().trim();
    try
    {
      if ("".equals(str1))
      {
        UiUtil.showToast(getActivity(), "请填写您的充值金额");
        return;
      }
    }
    catch (Exception localException1)
    {
      localException1.printStackTrace();
      return;
    }
    if (Integer.parseInt(str1) < 10)
    {
      UiUtil.showToast(getActivity(), "充值金额最低10元");
      return;
    }
    getPay("yinlian", str1);
  }

  private void dealPayList(List<PayTypeBean> paramList)
  {
    this.payIds = new ArrayList();
    if ((paramList != null) && (paramList.size() > 0))
    {
      Iterator localIterator = paramList.iterator();
      if (!localIterator.hasNext())
      {
        if ((!this.payIds.contains(Integer.valueOf(this.ids[0]))) && (!this.payIds.contains(Integer.valueOf(this.ids[1]))) && (!this.payIds.contains(Integer.valueOf(this.ids[2]))))
          break label1274;
        this.mXianXiaTv.setVisibility(0);
        this.mXianXiaLay.setVisibility(0);
        this.mBottomLay.setVisibility(0);
        this.mLoadingTv.setVisibility(8);
        label136: if ((!this.payIds.contains(Integer.valueOf(this.ids[3]))) && (!this.payIds.contains(Integer.valueOf(this.ids[4]))) && (!this.payIds.contains(Integer.valueOf(this.ids[5]))) && (!this.payIds.contains(Integer.valueOf(this.ids[6]))) && (!this.payIds.contains(Integer.valueOf(this.ids[7]))) && (!this.payIds.contains(Integer.valueOf(this.ids[8]))) && (!this.payIds.contains(Integer.valueOf(this.ids[9]))))
          break label1295;
        this.mXianshangTv.setVisibility(0);
        this.mXianshangLay.setVisibility(0);
        this.mBottomLay.setVisibility(0);
        this.mLoadingTv.setVisibility(8);
        label320: if (!this.payIds.contains(Integer.valueOf(this.ids[0])))
          break label1316;
        this.ll_xianxia_yinhang.setVisibility(0);
        label349: if (!this.payIds.contains(Integer.valueOf(this.ids[1])))
          break label1328;
        this.ll_xianxia_zhifubao.setVisibility(0);
        this.mXxZhifubaoLine.setVisibility(0);
        label386: if (!this.payIds.contains(Integer.valueOf(this.ids[2])))
          break label1349;
        this.mXxWeixinLine.setVisibility(0);
        this.ll_xianxia_weixin.setVisibility(0);
        label423: if (!this.payIds.contains(Integer.valueOf(this.ids[6])))
          break label1370;
        this.layout_zhifubao.setVisibility(0);
        this.mZhifubaoLine.setVisibility(0);
        this.layout_zhifubao.performClick();
        this.isZhifuBao = true;
        label474: if (!this.payIds.contains(Integer.valueOf(this.ids[8])))
          break label1396;
        this.layout_zhifubao3.setVisibility(0);
        this.mZhifubaoLine3.setVisibility(0);
        if (!this.payIds.contains(Integer.valueOf(this.ids[6])))
          this.layout_zhifubao3.performClick();
        this.isZhifuBao3 = true;
        label547: if (!this.payIds.contains(Integer.valueOf(this.ids[7])))
          break label1422;
        this.layout_zhifubao2.setVisibility(0);
        this.mZhifubaoLine2.setVisibility(0);
        if ((!this.payIds.contains(Integer.valueOf(this.ids[6]))) && (!this.payIds.contains(Integer.valueOf(this.ids[8]))))
          this.layout_zhifubao2.performClick();
        label637: if (!this.payIds.contains(Integer.valueOf(this.ids[5])))
          break label1443;
        this.layout_weixin.setVisibility(0);
        this.mWeixinLine.setVisibility(0);
        if ((!this.payIds.contains(Integer.valueOf(this.ids[6]))) && (!this.payIds.contains(Integer.valueOf(this.ids[7]))) && (!this.payIds.contains(Integer.valueOf(this.ids[8]))))
          this.layout_weixin.performClick();
        this.isWeixin = true;
        label753: if (!this.payIds.contains(Integer.valueOf(this.ids[9])))
          break label1469;
        this.layout_weixin3.setVisibility(0);
        this.mWeixinLine3.setVisibility(0);
        if ((!this.payIds.contains(Integer.valueOf(this.ids[5]))) && (!this.payIds.contains(Integer.valueOf(this.ids[6]))) && (!this.payIds.contains(Integer.valueOf(this.ids[7]))) && (!this.payIds.contains(Integer.valueOf(this.ids[8]))))
          this.layout_weixin3.performClick();
        this.isWeixin3 = true;
        label891: if (!this.payIds.contains(Integer.valueOf(this.ids[3])))
          break label1495;
        this.layout_zaixianzf.setVisibility(0);
        this.mYinlianLine.setVisibility(0);
        this.mYinlianLine1.setVisibility(0);
        if ((!this.payIds.contains(Integer.valueOf(this.ids[5]))) && (!this.payIds.contains(Integer.valueOf(this.ids[6]))) && (!this.payIds.contains(Integer.valueOf(this.ids[7]))) && (!this.payIds.contains(Integer.valueOf(this.ids[8]))) && (!this.payIds.contains(Integer.valueOf(this.ids[9]))))
          this.layout_zaixianzf.performClick();
      }
      while (true)
      {
        while (true)
        {
          if (!this.payIds.contains(Integer.valueOf(this.ids[4])))
            break label1525;
          this.mYinLian2.setVisibility(0);
          this.mYinlianLine2.setVisibility(0);
          if ((!this.payIds.contains(Integer.valueOf(this.ids[3]))) && (!this.payIds.contains(Integer.valueOf(this.ids[5]))) && (!this.payIds.contains(Integer.valueOf(this.ids[6]))) && (!this.payIds.contains(Integer.valueOf(this.ids[7]))) && (!this.payIds.contains(Integer.valueOf(this.ids[8]))) && (!this.payIds.contains(Integer.valueOf(this.ids[9]))))
            this.mYinLian2.performClick();
          return;
          PayTypeBean localPayTypeBean = (PayTypeBean)localIterator.next();
          try
          {
            int i = Integer.valueOf(localPayTypeBean.getIsSdkEffective()).intValue();
            this.payIds.add(Integer.valueOf(i));
          }
          catch (Exception localException)
          {
          }
        }
        break;
        label1274: this.mXianXiaTv.setVisibility(8);
        this.mXianXiaLay.setVisibility(8);
        break label136;
        label1295: this.mXianshangTv.setVisibility(8);
        this.mXianshangLay.setVisibility(8);
        break label320;
        label1316: this.ll_xianxia_yinhang.setVisibility(8);
        break label349;
        label1328: this.ll_xianxia_zhifubao.setVisibility(8);
        this.mXxZhifubaoLine.setVisibility(8);
        break label386;
        label1349: this.ll_xianxia_weixin.setVisibility(8);
        this.mXxWeixinLine.setVisibility(8);
        break label423;
        label1370: this.layout_zhifubao.setVisibility(8);
        this.mZhifubaoLine.setVisibility(8);
        this.isZhifuBao = false;
        break label474;
        label1396: this.layout_zhifubao3.setVisibility(8);
        this.mZhifubaoLine3.setVisibility(8);
        this.isZhifuBao3 = false;
        break label547;
        label1422: this.layout_zhifubao2.setVisibility(8);
        this.mZhifubaoLine2.setVisibility(8);
        break label637;
        label1443: this.layout_weixin.setVisibility(8);
        this.mWeixinLine.setVisibility(8);
        this.isWeixin = false;
        break label753;
        label1469: this.layout_weixin3.setVisibility(8);
        this.mWeixinLine3.setVisibility(8);
        this.isWeixin3 = false;
        break label891;
        label1495: this.layout_zaixianzf.setVisibility(8);
        this.mYinlianLine.setVisibility(8);
        this.mYinlianLine1.setVisibility(8);
      }
      label1525: this.mYinLian2.setVisibility(8);
      this.mYinlianLine2.setVisibility(8);
      return;
    }
    this.mXianshangTv.setVisibility(8);
    this.mXianshangLay.setVisibility(8);
    this.mXianXiaTv.setVisibility(8);
    this.mXianXiaLay.setVisibility(8);
    this.mBottomLay.setVisibility(8);
    this.mLoadingTv.setVisibility(0);
  }

  private List<Map<String, Object>> getBeginAndEnd(Pattern paramPattern, String paramString)
  {
    ArrayList localArrayList = new ArrayList();
    Matcher localMatcher = paramPattern.matcher(paramString);
    while (true)
    {
      if (!localMatcher.find())
        return localArrayList;
      HashMap localHashMap = new HashMap();
      localHashMap.put("VALUE", localMatcher.group());
      localHashMap.put("BEGIN", Integer.valueOf(localMatcher.start()));
      localHashMap.put("END", Integer.valueOf(localMatcher.end()));
      localArrayList.add(localHashMap);
    }
  }

  private void getPay(final String paramString1, final String paramString2)
  {
    HashMap localHashMap = new HashMap();
    localHashMap.put("amount", paramString2);
    localHashMap.put("guid", this.guid);
    localHashMap.put("client_Ip", CustomApplication.app.NetIP);
    localHashMap.put("payment_id", this.zhifuType);
    LogUtils.e(this.TAG, "guid" + this.guid);
    LogUtils.e(this.TAG, "client_Ip" + CustomApplication.app.NetIP);
    LogUtils.e(this.TAG, "payment_id" + this.zhifuType);
    setSureBtnIsEnable(false);
    RequestNet.get(getActivity(), AppConstants.URL_RECHARGE, localHashMap, new StringCallback()
    {
      public void onError(Call paramAnonymousCall, Exception paramAnonymousException)
      {
        ChongZhiFragment.this.setSureBtnIsEnable(true);
        LogUtils.e("获取失败", "getPay()-result:" + paramAnonymousException);
      }

      public void onResponse(String paramAnonymousString)
      {
        LogUtils.d("获取成功", "getPay()-result:" + paramAnonymousString);
        ChongZhiFragment.this.setSureBtnIsEnable(true);
        Gson localGson = new Gson();
        try
        {
          localReChargeBaseData = (ReChargeBaseData)localGson.fromJson(paramAnonymousString, ReChargeBaseData.class);
          if (localReChargeBaseData == null)
            return;
        }
        catch (Exception localException1)
        {
          ReChargeBaseData localReChargeBaseData;
          while (true)
          {
            localException1.printStackTrace();
            localReChargeBaseData = null;
          }
          if (localReChargeBaseData.getFlag() == -4)
          {
            ActivityStack.getInstance().backToMain(MainActivity.class, ChongZhiFragment.this.getActivity());
            return;
          }
          if (localReChargeBaseData.getFlag() == -3)
          {
            MainActivity.mainActivity.showFengjinDialog();
            return;
          }
          if (localReChargeBaseData.getFlag() == 0)
          {
            ChongZhiFragment.this.myDialog1.setMessage(localReChargeBaseData.getMsg());
            ChongZhiFragment.this.myDialog1.show();
            ChongZhiFragment.this.myDialog1.btn_confirm.setOnClickListener(new View.OnClickListener()
            {
              public void onClick(View paramAnonymous2View)
              {
                ChongZhiFragment.this.myDialog1.dismiss();
              }
            });
            return;
          }
          if (localReChargeBaseData.getFlag() == 1)
          {
            String str1 = localReChargeBaseData.getResult();
            LogUtils.d("获取成功", "getPay()-result:" + str1);
            if ("yinlian".equals(paramString1))
              if (ChongZhiFragment.this.window1.isShowing())
                ChongZhiFragment.this.window1.dismiss();
            while (CustomApplication.app.isLogin)
            {
              Intent localIntent = new Intent();
              localIntent.setClass(ChongZhiFragment.this.getActivity(), MainWebActivity.class);
              switch (ChongZhiFragment.this.zhifuType)
              {
              case 6:
              case 7:
              default:
                return;
              case 4:
                String str3 = localReChargeBaseData.getPayurl();
                localIntent.putExtra("title", "银联支付");
                localIntent.putExtra("url", str3);
                localIntent.putExtra("payNo", str1);
                ChongZhiFragment.this.startActivity(localIntent);
                return;
                if (ChongZhiFragment.this.window.isShowing())
                  ChongZhiFragment.this.window.dismiss();
                break;
              case 5:
                try
                {
                  PayUtils.pay(ChongZhiFragment.this.getActivity(), localReChargeBaseData.getResult(), localReChargeBaseData.getPayurl(), paramString2);
                  return;
                }
                catch (Exception localException2)
                {
                  localException2.printStackTrace();
                  UiUtil.showToast(ChongZhiFragment.this.getActivity(), "网络异常，请稍后重试");
                  return;
                }
              case 8:
                String str2 = localReChargeBaseData.getPayurl();
                localIntent.putExtra("title", "支付宝充值");
                localIntent.putExtra("url", str2);
                localIntent.putExtra("payNo", str1);
                ChongZhiFragment.this.startActivity(localIntent);
                return;
              }
            }
            LogUtils.d(" getPay()", "getPay()-没有登陆");
            return;
          }
          if (localReChargeBaseData.getFlag() == -2)
          {
            MainActivity.mainActivity.showOffLineDialog();
            return;
          }
          UiUtil.showToast(ChongZhiFragment.this.getActivity(), localReChargeBaseData.getMsg());
        }
      }
    });
  }

  private void setSureBtnIsEnable(boolean paramBoolean)
  {
    if (paramBoolean)
    {
      if (this.btn_zf_confirm != null)
        this.btn_zf_confirm.setBackgroundResource(2130838215);
      if (this.btn_zf_confirm1 != null)
        this.btn_zf_confirm1.setBackgroundResource(2130838215);
    }
    while (true)
    {
      if (this.btn_zf_confirm != null)
        this.btn_zf_confirm.setEnabled(paramBoolean);
      if (this.btn_zf_confirm1 != null)
        this.btn_zf_confirm1.setEnabled(paramBoolean);
      return;
      if (this.btn_zf_confirm1 != null)
        this.btn_zf_confirm1.setBackgroundResource(2130838087);
      if (this.btn_zf_confirm != null)
        this.btn_zf_confirm.setBackgroundResource(2130838087);
    }
  }

  private void showImgView(String paramString)
  {
    if ((this.chongzhitishiDialog != null) && (MainActivity.selectIndex == 1))
      this.chongzhitishiDialog.show();
    GetTransBankRateBean localGetTransBankRateBean;
    do
    {
      do
      {
        return;
        if ((paramString == null) || ("".equals(paramString)))
        {
          LogUtils.e(this.TAG, "result:" + paramString);
          return;
        }
        Gson localGson = new Gson();
        try
        {
          localGetTransBankRateBean = (GetTransBankRateBean)localGson.fromJson(paramString, GetTransBankRateBean.class);
          if (localGetTransBankRateBean == null)
          {
            LogUtils.e(this.TAG, "gettransbankrate == null，获取失败");
            return;
          }
        }
        catch (Exception localException1)
        {
          while (true)
          {
            localException1.printStackTrace();
            localGetTransBankRateBean = null;
          }
        }
      }
      while (localGetTransBankRateBean.getFlag() == 0);
      if (localGetTransBankRateBean.getFlag() == -2)
      {
        MainActivity.mainActivity.showOffLineDialog();
        return;
      }
      if (localGetTransBankRateBean.getFlag() == -3)
      {
        MainActivity.mainActivity.showFengjinDialog();
        return;
      }
    }
    while (localGetTransBankRateBean.getFlag() != 1);
    this.chongzhitishiDialog = new ChongzhitishiDialog(getActivity());
    this.chongzhitishiDialog.tv_title.setText(localGetTransBankRateBean.getTitle());
    String str1 = localGetTransBankRateBean.getMsg();
    String str2 = localGetTransBankRateBean.getFirst_rate();
    String str3 = localGetTransBankRateBean.getRate();
    double d1 = 0.0D;
    double d2 = 0.0D;
    try
    {
      double d3 = Double.parseDouble(str2);
      double d4 = Double.parseDouble(str3);
      d1 = d3 * 100.0D;
      d2 = d4 * 100.0D;
      (2 + str1.indexOf(d1 + "%"));
      (2 + str1.indexOf(d2 + "%"));
      str1.indexOf("②");
      str1.indexOf("③");
      if (!"".endsWith(str1))
      {
        this.chongzhitishiDialog.tv_tishi.setText(parseValueColor(str1));
        if (MainActivity.selectIndex == 1)
          this.chongzhitishiDialog.show();
        this.chongzhitishiDialog.tv_tishi.setText(parseValueColor(str1));
        return;
      }
    }
    catch (Exception localException2)
    {
      while (true)
        localException2.printStackTrace();
      this.chongzhitishiDialog.tv_tishi.setText(str1);
      this.chongzhitishiDialog.tv_tishi.setTextColor(getActivity().getResources().getColor(2131165327));
    }
  }

  private void showNewuserRegisterPopwindow()
  {
    this.viewRegisterNew.bringToFront();
    this.scroll_register_new = ((ScrollView)this.viewRegisterNew.findViewById(2131100190));
    (4 * CustomApplication.app.displayMetrics.widthPixels / 3);
    if (this.window_register_new == null)
      this.window_register_new = new PopupWindow(this.viewRegisterNew, -1, -1);
    this.window_register_new.setFocusable(true);
    this.window_register_new.setOutsideTouchable(true);
    ImageView localImageView = (ImageView)this.viewRegisterNew.findViewById(2131100198);
    localImageView.bringToFront();
    localImageView.setOnClickListener(new View.OnClickListener()
    {
      public void onClick(View paramAnonymousView)
      {
        ChongZhiFragment.this.window_register_new.dismiss();
      }
    });
    this.tv_user_name_tishi_new = ((TextView)this.viewRegisterNew.findViewById(2131100199));
    this.tv_user_psw_tishi_new = ((TextView)this.viewRegisterNew.findViewById(2131100201));
    this.tv_user_con_psw_tishi_new = ((TextView)this.viewRegisterNew.findViewById(2131100203));
    this.tv_user_nick_name_tishi_new = ((TextView)this.viewRegisterNew.findViewById(2131100207));
    this.tv_xieyi_new = ((TextView)this.viewRegisterNew.findViewById(2131100210));
    this.ck_xieyi_new = ((CheckBox)this.viewRegisterNew.findViewById(2131100209));
    this.ck_xieyi_new.setChecked(false);
    this.tv_xieyi_new.setOnClickListener(new View.OnClickListener()
    {
      public void onClick(View paramAnonymousView)
      {
        ChongZhiFragment.this.viewRegisterNew.bringToFront();
        Intent localIntent = new Intent();
        localIntent.setClass(ChongZhiFragment.this.getActivity(), MainWebActivity.class);
        localIntent.putExtra("url", AppConstants.BASE_URL_IMG + "/wap/xy.html");
        localIntent.putExtra("title", "注册协议");
        ChongZhiFragment.this.startActivity(localIntent);
      }
    });
    this.tv_lianxi_kefu_new = ((TextView)this.viewRegisterNew.findViewById(2131100211));
    this.tv_lianxi_kefu_new.setOnClickListener(new View.OnClickListener()
    {
      public void onClick(View paramAnonymousView)
      {
        ChongZhiFragment.this.viewRegisterNew.bringToFront();
        ChongZhiFragment.this.startActivity(new Intent(ChongZhiFragment.this.getActivity(), CustomServiceActivity.class));
      }
    });
    this.edit_register_username_new = ((EditText)this.viewRegisterNew.findViewById(2131100200));
    this.edit_register_username_new.setOnFocusChangeListener(new View.OnFocusChangeListener()
    {
      public void onFocusChange(View paramAnonymousView, boolean paramAnonymousBoolean)
      {
        ChongZhiFragment.this.registerUserNameNew = ChongZhiFragment.this.edit_register_username_new.getText().toString();
        if (!ChongZhiFragment.this.edit_register_username_new.hasFocus())
        {
          if ("".equals(ChongZhiFragment.this.registerUserNameNew))
            ChongZhiFragment.this.tv_user_name_tishi_new.setText("请输入您的账号");
        }
        else
          return;
        if (!UiUtil.isValidUserName(ChongZhiFragment.this.registerUserNameNew))
        {
          ChongZhiFragment.this.tv_user_name_tishi_new.setText("账号需要6~12位字符或数字");
          return;
        }
        ChongZhiFragment.this.tv_user_name_tishi_new.setText("");
      }
    });
    this.edit_register_psw_new = ((EditText)this.viewRegisterNew.findViewById(2131100202));
    this.edit_register_psw_new.setOnFocusChangeListener(new View.OnFocusChangeListener()
    {
      public void onFocusChange(View paramAnonymousView, boolean paramAnonymousBoolean)
      {
        ChongZhiFragment.this.registerUserPswNew = ChongZhiFragment.this.edit_register_psw_new.getText().toString();
        if (!ChongZhiFragment.this.edit_register_psw_new.hasFocus())
        {
          if ("".equals(ChongZhiFragment.this.registerUserPswNew))
            ChongZhiFragment.this.tv_user_name_tishi_new.setText("请输入您的密码");
        }
        else
          return;
        if (!UiUtil.isValidUserName(ChongZhiFragment.this.registerUserPswNew))
        {
          ChongZhiFragment.this.tv_user_name_tishi_new.setText("密码需要6~12位字符或数字");
          return;
        }
        if (ChongZhiFragment.this.registerUserNameNew.equals(ChongZhiFragment.this.registerUserPswNew))
        {
          ChongZhiFragment.this.tv_user_name_tishi_new.setText("账号和密码不能一致");
          return;
        }
        ChongZhiFragment.this.tv_user_name_tishi_new.setText("");
      }
    });
    this.edit_register_rppsw_new = ((EditText)this.viewRegisterNew.findViewById(2131100204));
    this.edit_register_rppsw_new.setOnFocusChangeListener(new View.OnFocusChangeListener()
    {
      public void onFocusChange(View paramAnonymousView, boolean paramAnonymousBoolean)
      {
        ChongZhiFragment.this.registerUserPswRpNew = ChongZhiFragment.this.edit_register_rppsw_new.getText().toString();
        if (!ChongZhiFragment.this.edit_register_rppsw_new.hasFocus())
        {
          if (!ChongZhiFragment.this.registerUserPswNew.equals(ChongZhiFragment.this.registerUserPswRpNew))
            ChongZhiFragment.this.tv_user_name_tishi_new.setText("两次密码不一致");
        }
        else
          return;
        ChongZhiFragment.this.tv_user_name_tishi_new.setText("");
      }
    });
    this.edit_register_introduce_new = ((EditText)this.viewRegisterNew.findViewById(2131100206));
    this.registerpid = this.edit_register_introduce_new.getText().toString().trim();
    this.edit_register_nickname_new = ((EditText)this.viewRegisterNew.findViewById(2131100208));
    this.edit_register_nickname_new.setVisibility(8);
    this.edit_register_nickname_new.setOnFocusChangeListener(new View.OnFocusChangeListener()
    {
      public void onFocusChange(View paramAnonymousView, boolean paramAnonymousBoolean)
      {
        ChongZhiFragment.this.registerNickNameNew = ChongZhiFragment.this.edit_register_nickname_new.getText().toString();
        LogUtils.e(ChongZhiFragment.this.TAG, "registerNickName：" + ChongZhiFragment.this.registerNickNameNew);
        if (!ChongZhiFragment.this.edit_register_nickname_new.hasFocus())
        {
          if ("".equals(ChongZhiFragment.this.registerNickNameNew))
            ChongZhiFragment.this.tv_user_nick_name_tishi_new.setText("请输入您的昵称");
        }
        else
          return;
        if (!UiUtil.isContainsChinese(ChongZhiFragment.this.registerNickNameNew))
        {
          ChongZhiFragment.this.tv_user_nick_name_tishi_new.setText("昵称需要包含中文");
          return;
        }
        ChongZhiFragment.this.tv_user_nick_name_tishi_new.setText("");
      }
    });
    this.window_register_new.setSoftInputMode(16);
    this.img_register_new.setOnClickListener(new View.OnClickListener()
    {
      public void onClick(View paramAnonymousView)
      {
        ChongZhiFragment.this.img_register_new.setEnabled(false);
        ChongZhiFragment.this.ChangeUserInfo();
      }
    });
    this.window_register_new.setBackgroundDrawable(getActivity().getResources().getDrawable(2130837534));
    this.window_register_new.setAnimationStyle(2131361795);
    this.window_register_new.showAtLocation(this.contentView, 17, 0, 60);
    this.window_register_new.setOnDismissListener(new PopupWindow.OnDismissListener()
    {
      public void onDismiss()
      {
        ChongZhiFragment.this.edit_register_username_new.setText("");
        ChongZhiFragment.this.edit_register_psw_new.setText("");
        ChongZhiFragment.this.edit_register_rppsw_new.setText("");
        ChongZhiFragment.this.edit_register_nickname_new.setText("");
        ChongZhiFragment.this.edit_register_introduce_new.setText("");
        ChongZhiFragment.this.tv_user_name_tishi_new.setText("");
        ChongZhiFragment.this.tv_user_psw_tishi_new.setText("");
        ChongZhiFragment.this.tv_user_con_psw_tishi_new.setText("");
        ChongZhiFragment.this.tv_user_nick_name_tishi_new.setText("");
      }
    });
  }

  private void showZhifuPopwindow()
  {
    View localView = LayoutInflater.from(getActivity()).inflate(2130903168, null);
    (9 * (8 * (CustomApplication.app.displayMetrics.widthPixels / 10) / 10));
    PopupWindow localPopupWindow1 = new PopupWindow(localView, -1, -1);
    this.window = localPopupWindow1;
    this.window.setFocusable(true);
    ((TextView)localView.findViewById(2131100224)).setText(this.zhifuTypeStr);
    ((LinearLayout)localView.findViewById(2131100177)).setBackgroundResource(2130838128);
    this.edit_jin_e = ((EditText)localView.findViewById(2131100225));
    this.edit_jin_e.setVisibility(8);
    GridView localGridView = (GridView)localView.findViewById(2131100226);
    this.noticeListChongZhi.clear();
    NoticeBaseModel localNoticeBaseModel1 = new NoticeBaseModel();
    localNoticeBaseModel1.setName("10");
    this.noticeListChongZhi.add(localNoticeBaseModel1);
    NoticeBaseModel localNoticeBaseModel2 = new NoticeBaseModel();
    localNoticeBaseModel2.setName("50");
    this.noticeListChongZhi.add(localNoticeBaseModel2);
    NoticeBaseModel localNoticeBaseModel3 = new NoticeBaseModel();
    localNoticeBaseModel3.setName("100");
    this.noticeListChongZhi.add(localNoticeBaseModel3);
    NoticeBaseModel localNoticeBaseModel4 = new NoticeBaseModel();
    localNoticeBaseModel4.setName("200");
    this.noticeListChongZhi.add(localNoticeBaseModel4);
    NoticeBaseModel localNoticeBaseModel5 = new NoticeBaseModel();
    localNoticeBaseModel5.setName("500");
    this.noticeListChongZhi.add(localNoticeBaseModel5);
    NoticeBaseModel localNoticeBaseModel6 = new NoticeBaseModel();
    localNoticeBaseModel6.setName("1000");
    this.noticeListChongZhi.add(localNoticeBaseModel6);
    NoticeBaseModel localNoticeBaseModel7 = new NoticeBaseModel();
    localNoticeBaseModel7.setName("2000");
    this.noticeListChongZhi.add(localNoticeBaseModel7);
    NoticeBaseModel localNoticeBaseModel8 = new NoticeBaseModel();
    localNoticeBaseModel8.setName("5000");
    this.noticeListChongZhi.add(localNoticeBaseModel8);
    if (this.chongZJinEGridViewAdapter == null)
    {
      this.chongZJinEGridViewAdapter = new ChongZJinEGridViewAdapter(getActivity(), this.noticeListChongZhi);
      this.chongZJinEGridViewAdapter.notifyDataSetChanged();
    }
    localGridView.setAdapter(this.chongZJinEGridViewAdapter);
    AdapterView.OnItemClickListener local2 = new AdapterView.OnItemClickListener()
    {
      public void onItemClick(AdapterView<?> paramAnonymousAdapterView, View paramAnonymousView, int paramAnonymousInt, long paramAnonymousLong)
      {
        try
        {
          ChongZhiFragment.this.chongZJinEGridViewAdapter.setSelection(paramAnonymousInt);
          ChongZhiFragment.this.chongZJinEGridViewAdapter.notifyDataSetChanged();
          NoticeBaseModel localNoticeBaseModel = (NoticeBaseModel)ChongZhiFragment.this.noticeListChongZhi.get(paramAnonymousInt);
          ChongZhiFragment.this.money = localNoticeBaseModel.getName();
          LogUtils.d("onItemClickListener", ChongZhiFragment.this.money);
          return;
        }
        catch (Exception localException)
        {
          localException.printStackTrace();
        }
      }
    };
    localGridView.setOnItemClickListener(local2);
    this.window.setSoftInputMode(16);
    this.btn_zf_confirm = ((Button)localView.findViewById(2131100227));
    Button localButton = this.btn_zf_confirm;
    View.OnClickListener local3 = new View.OnClickListener()
    {
      public void onClick(View paramAnonymousView)
      {
        ChongZhiFragment.this.getPay("zhifubao", ChongZhiFragment.this.money);
      }
    };
    localButton.setOnClickListener(local3);
    ImageView localImageView = (ImageView)localView.findViewById(2131100198);
    localImageView.bringToFront();
    View.OnClickListener local4 = new View.OnClickListener()
    {
      public void onClick(View paramAnonymousView)
      {
        if (ChongZhiFragment.this.window.isShowing())
          ChongZhiFragment.this.window.dismiss();
      }
    };
    localImageView.setOnClickListener(local4);
    this.window.setAnimationStyle(2131361795);
    this.window.setBackgroundDrawable(getActivity().getResources().getDrawable(2130837534));
    this.window.showAtLocation(this.contentView, 17, 0, 60);
    PopupWindow localPopupWindow2 = this.window;
    PopupWindow.OnDismissListener local5 = new PopupWindow.OnDismissListener()
    {
      public void onDismiss()
      {
      }
    };
    localPopupWindow2.setOnDismissListener(local5);
  }

  private void showyinlianPopwindow()
  {
    View localView = LayoutInflater.from(getActivity()).inflate(2130903169, null);
    (9 * (8 * (CustomApplication.app.displayMetrics.widthPixels / 10) / 10));
    PopupWindow localPopupWindow1 = new PopupWindow(localView, -1, -1);
    this.window1 = localPopupWindow1;
    this.window1.setFocusable(true);
    ((TextView)localView.findViewById(2131100224)).setText(this.zhifuTypeStr);
    ((LinearLayout)localView.findViewById(2131100177)).setBackgroundResource(2130837516);
    this.edit_jin_e1 = ((EditText)localView.findViewById(2131100225));
    this.edit_jin_e1.addTextChangedListener(this.textWatcher);
    GridView localGridView = (GridView)localView.findViewById(2131100226);
    this.noticeListChongZhi.clear();
    NoticeBaseModel localNoticeBaseModel1 = new NoticeBaseModel();
    localNoticeBaseModel1.setName("10");
    this.noticeListChongZhi.add(localNoticeBaseModel1);
    NoticeBaseModel localNoticeBaseModel2 = new NoticeBaseModel();
    localNoticeBaseModel2.setName("50");
    this.noticeListChongZhi.add(localNoticeBaseModel2);
    NoticeBaseModel localNoticeBaseModel3 = new NoticeBaseModel();
    localNoticeBaseModel3.setName("100");
    this.noticeListChongZhi.add(localNoticeBaseModel3);
    NoticeBaseModel localNoticeBaseModel4 = new NoticeBaseModel();
    localNoticeBaseModel4.setName("200");
    this.noticeListChongZhi.add(localNoticeBaseModel4);
    NoticeBaseModel localNoticeBaseModel5 = new NoticeBaseModel();
    localNoticeBaseModel5.setName("500");
    this.noticeListChongZhi.add(localNoticeBaseModel5);
    NoticeBaseModel localNoticeBaseModel6 = new NoticeBaseModel();
    localNoticeBaseModel6.setName("1000");
    this.noticeListChongZhi.add(localNoticeBaseModel6);
    NoticeBaseModel localNoticeBaseModel7 = new NoticeBaseModel();
    localNoticeBaseModel7.setName("2000");
    this.noticeListChongZhi.add(localNoticeBaseModel7);
    NoticeBaseModel localNoticeBaseModel8 = new NoticeBaseModel();
    localNoticeBaseModel8.setName("5000");
    this.noticeListChongZhi.add(localNoticeBaseModel8);
    if (this.chongZJinEGridViewAdapter == null)
    {
      this.chongZJinEGridViewAdapter = new ChongZJinEGridViewAdapter(getActivity(), this.noticeListChongZhi);
      this.chongZJinEGridViewAdapter.notifyDataSetChanged();
    }
    localGridView.setAdapter(this.chongZJinEGridViewAdapter);
    this.window1.setSoftInputMode(16);
    this.btn_zf_confirm1 = ((Button)localView.findViewById(2131100227));
    Button localButton = this.btn_zf_confirm1;
    View.OnClickListener local6 = new View.OnClickListener()
    {
      public void onClick(View paramAnonymousView)
      {
        String str = ChongZhiFragment.this.edit_jin_e1.getText().toString().trim();
        try
        {
          if ("".equals(str))
          {
            UiUtil.showToast(ChongZhiFragment.this.getActivity(), "请填写您的充值金额");
            return;
          }
          if (Integer.parseInt(str) < 10)
          {
            UiUtil.showToast(ChongZhiFragment.this.getActivity(), "充值金额最低10元");
            return;
          }
        }
        catch (Exception localException)
        {
          localException.printStackTrace();
          return;
        }
        ChongZhiFragment.this.isYinlian = true;
        ChongZhiFragment.this.getPayTypeList();
      }
    };
    localButton.setOnClickListener(local6);
    ImageView localImageView = (ImageView)localView.findViewById(2131100198);
    localImageView.bringToFront();
    View.OnClickListener local7 = new View.OnClickListener()
    {
      public void onClick(View paramAnonymousView)
      {
        if (ChongZhiFragment.this.window1.isShowing())
          ChongZhiFragment.this.window1.dismiss();
      }
    };
    localImageView.setOnClickListener(local7);
    this.window1.setAnimationStyle(2131361795);
    this.window1.setBackgroundDrawable(getActivity().getResources().getDrawable(2130837534));
    this.window1.showAtLocation(this.contentView, 17, 0, 60);
    PopupWindow localPopupWindow2 = this.window1;
    PopupWindow.OnDismissListener local8 = new PopupWindow.OnDismissListener()
    {
      public void onDismiss()
      {
      }
    };
    localPopupWindow2.setOnDismissListener(local8);
  }

  public void getPayTypeList()
  {
    HashMap localHashMap = new HashMap();
    if (CustomApplication.app.userBaseBean == null)
      return;
    localHashMap.put("memberid", CustomApplication.app.userBaseBean.getMemberid());
    RequestNet.get(getActivity(), AppConstants.URL_GETPAYSTATE, localHashMap, new StringCallback()
    {
      public void onError(Call paramAnonymousCall, Exception paramAnonymousException)
      {
        LogUtils.e(ChongZhiFragment.this.TAG, "获取失败getoauthuserstate()-result:" + paramAnonymousException);
      }

      public void onResponse(String paramAnonymousString)
      {
        LogUtils.d(ChongZhiFragment.this.TAG, "result:" + paramAnonymousString);
        Gson localGson = new Gson();
        PayTypeListBean localPayTypeListBean;
        try
        {
          localPayTypeListBean = (PayTypeListBean)localGson.fromJson(paramAnonymousString, PayTypeListBean.class);
          if (localPayTypeListBean == null)
            return;
        }
        catch (Exception localException)
        {
          do
          {
            while (true)
            {
              localException.printStackTrace();
              localPayTypeListBean = null;
            }
            if (localPayTypeListBean.getFlag() == -4)
            {
              ActivityStack.getInstance().backToMain(MainActivity.class, ChongZhiFragment.this.getActivity());
              return;
            }
            if (localPayTypeListBean.getFlag() == 0)
            {
              ChongZhiFragment.this.myDialog1.setMessage(localPayTypeListBean.getMsg());
              ChongZhiFragment.this.myDialog1.show();
              ChongZhiFragment.this.myDialog1.btn_confirm.setOnClickListener(new View.OnClickListener()
              {
                public void onClick(View paramAnonymous2View)
                {
                  ChongZhiFragment.this.myDialog1.dismiss();
                }
              });
              return;
            }
            if (localPayTypeListBean.getFlag() == -2)
            {
              MainActivity.mainActivity.showOffLineDialog();
              return;
            }
            if (localPayTypeListBean.getFlag() == -3)
            {
              MainActivity.mainActivity.showFengjinDialog();
              return;
            }
          }
          while (localPayTypeListBean.getFlag() != 1);
          if (!ChongZhiFragment.this.isYinlian)
            break label218;
        }
        ChongZhiFragment.this.checkZhifu(localPayTypeListBean.getResult());
        while (true)
        {
          ChongZhiFragment.this.isYinlian = false;
          return;
          label218: ChongZhiFragment.this.dealPayList(localPayTypeListBean.getResult());
        }
      }
    });
  }

  public void getoauthuserstate()
  {
    HashMap localHashMap = new HashMap();
    if (CustomApplication.app.userBaseBean == null)
      return;
    this.guid = CustomApplication.app.userBaseBean.getGuid();
    localHashMap.put("guid", this.guid);
    RequestNet.get(getActivity(), AppConstants.URL_GET_GETOAUTHUSERSTATE, localHashMap, new StringCallback()
    {
      public void onError(Call paramAnonymousCall, Exception paramAnonymousException)
      {
        LogUtils.e(ChongZhiFragment.this.TAG, "获取失败getoauthuserstate()-result:" + paramAnonymousException);
      }

      public void onResponse(String paramAnonymousString)
      {
        Gson localGson = new Gson();
        try
        {
          localGetOauthUserStateBase = (GetOauthUserStateBase)localGson.fromJson(paramAnonymousString, GetOauthUserStateBase.class);
          if (localGetOauthUserStateBase == null)
            return;
        }
        catch (Exception localException)
        {
          GetOauthUserStateBase localGetOauthUserStateBase;
          do
          {
            while (true)
            {
              localException.printStackTrace();
              localGetOauthUserStateBase = null;
            }
            if (localGetOauthUserStateBase.getFlag() == -4)
            {
              ActivityStack.getInstance().backToMain(MainActivity.class, ChongZhiFragment.this.getActivity());
              return;
            }
            if (localGetOauthUserStateBase.getFlag() == 0)
            {
              ChongZhiFragment.this.myDialog1.setMessage(localGetOauthUserStateBase.getMsg());
              ChongZhiFragment.this.myDialog1.show();
              ChongZhiFragment.this.myDialog1.btn_confirm.setOnClickListener(new View.OnClickListener()
              {
                public void onClick(View paramAnonymous2View)
                {
                  ChongZhiFragment.this.myDialog1.dismiss();
                }
              });
              return;
            }
            if (localGetOauthUserStateBase.getFlag() == -2)
            {
              MainActivity.mainActivity.showOffLineDialog();
              return;
            }
            if (localGetOauthUserStateBase.getFlag() == -3)
            {
              MainActivity.mainActivity.showFengjinDialog();
              return;
            }
          }
          while (localGetOauthUserStateBase.getFlag() != 1);
          ChongZhiFragment.this.state = localGetOauthUserStateBase.getState();
        }
      }
    });
  }

  public void gettransbankrate()
  {
    if (!CustomApplication.app.isLogin)
      return;
    HashMap localHashMap = new HashMap();
    localHashMap.put("memberid", CustomApplication.app.userBaseBean.getMemberid());
    LogUtils.d(this.TAG, "URL:" + AppConstants.URL_GET_GETTRANSBANKRATE);
    RequestNet.get(getActivity(), AppConstants.URL_GET_GETTRANSBANKRATE, localHashMap, new StringCallback()
    {
      public void onError(Call paramAnonymousCall, Exception paramAnonymousException)
      {
        LogUtils.e(ChongZhiFragment.this.TAG, "获取失败,gettransbankrate():" + paramAnonymousException);
      }

      public void onResponse(String paramAnonymousString)
      {
        Log.e(ChongZhiFragment.this.TAG, paramAnonymousString);
        FragmentActivity localFragmentActivity = ChongZhiFragment.this.getActivity();
        ChongZhiFragment.this.getActivity();
        SharedPreferences.Editor localEditor = localFragmentActivity.getSharedPreferences("chongzhi", 0).edit();
        localEditor.putString("chongzhiCache", paramAnonymousString);
        localEditor.commit();
        ChongZhiFragment.this.showImgView(paramAnonymousString);
      }
    });
  }

  public void init()
  {
    this.myDialog1 = new MyDialog1(getActivity());
    this.lin_huodong_text = ((LinearLayout)this.contentView.findViewById(2131100080));
    int i = 6 * (this.screenWidth / 10);
    ViewGroup.LayoutParams localLayoutParams = this.lin_huodong_text.getLayoutParams();
    localLayoutParams.width = i;
    this.lin_huodong_text.setLayoutParams(localLayoutParams);
    this.iv_kefu = ((ImageView)this.contentView.findViewById(2131099802));
    this.iv_kefu.setOnClickListener(this);
    this.iv_chongzhi_jilu = ((ImageView)this.contentView.findViewById(2131099801));
    this.iv_chongzhi_jilu.setOnClickListener(this);
    this.btn_zf = ((ImageView)this.contentView.findViewById(2131099792));
    this.btn_zf.setOnClickListener(this);
    this.layout_weixin = ((RelativeLayout)this.contentView.findViewById(2131099775));
    this.layout_zhifubao = ((RelativeLayout)this.contentView.findViewById(2131099763));
    this.layout_zaixianzf = ((RelativeLayout)this.contentView.findViewById(2131099783));
    this.layout_zhifubao2 = ((RelativeLayout)this.contentView.findViewById(2131099771));
    this.layout_zhifubao3 = ((RelativeLayout)this.contentView.findViewById(2131099767));
    this.layout_weixin3 = ((RelativeLayout)this.contentView.findViewById(2131099779));
    this.layout_zhifubao3.setOnClickListener(this);
    this.layout_weixin3.setOnClickListener(this);
    this.ck_zhifubao3 = ((CheckBox)this.contentView.findViewById(2131099769));
    this.ck_zhifubao3.setChecked(false);
    this.ck_weixin3 = ((CheckBox)this.contentView.findViewById(2131099781));
    this.ck_weixin3.setChecked(false);
    this.mZhifubaoLine3 = ((ImageView)this.contentView.findViewById(2131099770));
    this.mWeixinLine3 = ((ImageView)this.contentView.findViewById(2131099782));
    this.mYinLian2 = ((RelativeLayout)this.contentView.findViewById(2131099786));
    this.mYinlianLine1 = ((ImageView)this.contentView.findViewById(2131099785));
    this.mYinlianLine2 = ((ImageView)this.contentView.findViewById(2131099789));
    this.mYinLian2.setOnClickListener(this);
    this.ck_zaixinzf2 = ((CheckBox)this.contentView.findViewById(2131099788));
    this.ck_zaixinzf2.setChecked(false);
    this.ll_xianxia_zhifubao = ((LinearLayout)this.contentView.findViewById(2131099795));
    this.ll_xianxia_weixin = ((LinearLayout)this.contentView.findViewById(2131099797));
    this.ll_xianxia_yinhang = ((LinearLayout)this.contentView.findViewById(2131099799));
    this.ll_xianxia_zhifubao.setOnClickListener(this);
    this.ll_xianxia_weixin.setOnClickListener(this);
    this.ll_xianxia_yinhang.setOnClickListener(this);
    this.ck_zhifubao = ((CheckBox)this.contentView.findViewById(2131099765));
    this.ck_zhifubao.setChecked(true);
    this.ck_zhifubao2 = ((CheckBox)this.contentView.findViewById(2131099773));
    this.ck_zhifubao2.setChecked(false);
    this.ck_weixin = ((CheckBox)this.contentView.findViewById(2131099777));
    this.ck_weixin.setChecked(false);
    this.ck_zaixinzf = ((CheckBox)this.contentView.findViewById(2131099784));
    this.ck_zaixinzf.setChecked(false);
    this.layout_weixin.setOnClickListener(this);
    this.layout_zhifubao.setOnClickListener(this);
    this.layout_zaixianzf.setOnClickListener(this);
    this.layout_zhifubao2.setOnClickListener(this);
    this.viewRegisterNew = LayoutInflater.from(getActivity()).inflate(2130903163, null);
    this.img_register_new = ((ImageView)this.viewRegisterNew.findViewById(2131100212));
    this.mXianshangTv = ((TextView)this.contentView.findViewById(2131099761));
    this.mXianshangLay = ((LinearLayout)this.contentView.findViewById(2131099762));
    this.mXianXiaTv = ((TextView)this.contentView.findViewById(2131099793));
    this.mXianXiaLay = ((LinearLayout)this.contentView.findViewById(2131099794));
    this.mZhifubaoLine = ((ImageView)this.contentView.findViewById(2131099766));
    this.mZhifubaoLine2 = ((ImageView)this.contentView.findViewById(2131099774));
    this.mWeixinLine = ((ImageView)this.contentView.findViewById(2131099778));
    this.mYinlianLine = ((ImageView)this.contentView.findViewById(2131099790));
    this.mXxZhifubaoLine = ((ImageView)this.contentView.findViewById(2131099796));
    this.mXxWeixinLine = ((ImageView)this.contentView.findViewById(2131099798));
    this.mBottomLay = ((LinearLayout)this.contentView.findViewById(2131099800));
    this.mLoadingTv = ((TextView)this.contentView.findViewById(2131099803));
    this.mXianshangTv.setVisibility(8);
    this.mXianshangLay.setVisibility(8);
    this.mXianXiaTv.setVisibility(8);
    this.mXianXiaLay.setVisibility(8);
    this.mBottomLay.setVisibility(8);
    this.mLoadingTv.setVisibility(0);
  }

  public void isFirst()
  {
    this.calendar = Calendar.getInstance();
    int i = this.calendar.get(5);
    SharedPreferences localSharedPreferences = getActivity().getSharedPreferences("chongzhi", 0);
    int j = localSharedPreferences.getInt("day", 0);
    SharedPreferences.Editor localEditor = localSharedPreferences.edit();
    while (true)
    {
      String str;
      try
      {
        str = localSharedPreferences.getString("chongzhiCache", "");
        if (j != i)
        {
          localEditor.putInt("day", i);
          localEditor.commit();
          gettransbankrate();
          return;
        }
        if ((str == null) || (str.equals("")))
        {
          gettransbankrate();
          LogUtils.d("debug", "不是第一次运行");
          return;
        }
      }
      catch (Exception localException)
      {
        localException.printStackTrace();
        return;
      }
      showImgView(str);
    }
  }

  public void onClick(View paramView)
  {
    switch (paramView.getId())
    {
    default:
      return;
    case 2131099801:
      startActivity(new Intent(getActivity(), XianxiaTijiaoJiluActivity.class));
      return;
    case 2131099802:
      startActivity(new Intent(getActivity(), CustomServiceActivity.class));
      return;
    case 2131099763:
      this.zhifuType = 7;
      this.zhifuTypeStr = "支付宝支付";
      this.ck_zhifubao.setChecked(true);
      this.ck_weixin.setChecked(false);
      this.ck_zaixinzf.setChecked(false);
      this.ck_zhifubao2.setChecked(false);
      this.ck_zhifubao3.setChecked(false);
      this.ck_weixin3.setChecked(false);
      this.ck_zaixinzf2.setChecked(false);
      return;
    case 2131099771:
      this.zhifuType = 8;
      this.zhifuTypeStr = "支付宝支付";
      this.ck_zhifubao.setChecked(false);
      this.ck_weixin.setChecked(false);
      this.ck_zaixinzf.setChecked(false);
      this.ck_zhifubao2.setChecked(true);
      this.ck_zhifubao3.setChecked(false);
      this.ck_weixin3.setChecked(false);
      this.ck_zaixinzf2.setChecked(false);
      return;
    case 2131099767:
      this.zhifuType = 9;
      this.zhifuTypeStr = "支付宝支付";
      this.ck_zhifubao.setChecked(false);
      this.ck_weixin.setChecked(false);
      this.ck_zaixinzf.setChecked(false);
      this.ck_zhifubao2.setChecked(false);
      this.ck_zhifubao3.setChecked(true);
      this.ck_weixin3.setChecked(false);
      this.ck_zaixinzf2.setChecked(false);
      return;
    case 2131099775:
      this.zhifuType = 6;
      this.zhifuTypeStr = "微信";
      this.ck_weixin.setChecked(true);
      this.ck_zhifubao.setChecked(false);
      this.ck_zaixinzf.setChecked(false);
      this.ck_zhifubao2.setChecked(false);
      this.ck_zhifubao3.setChecked(false);
      this.ck_weixin3.setChecked(false);
      this.ck_zaixinzf2.setChecked(false);
      return;
    case 2131099779:
      this.zhifuType = 10;
      this.zhifuTypeStr = "微信";
      this.ck_weixin.setChecked(false);
      this.ck_zhifubao.setChecked(false);
      this.ck_zaixinzf.setChecked(false);
      this.ck_zhifubao2.setChecked(false);
      this.ck_zhifubao3.setChecked(false);
      this.ck_weixin3.setChecked(true);
      this.ck_zaixinzf2.setChecked(false);
      return;
    case 2131099783:
      this.zhifuType = 4;
      this.zhifuTypeStr = "银联支付";
      this.ck_zaixinzf.setChecked(true);
      this.ck_weixin.setChecked(false);
      this.ck_zhifubao.setChecked(false);
      this.ck_zhifubao2.setChecked(false);
      this.ck_zhifubao3.setChecked(false);
      this.ck_weixin3.setChecked(false);
      this.ck_zaixinzf2.setChecked(false);
      return;
    case 2131099786:
      this.zhifuType = 5;
      this.zhifuTypeStr = "银联支付";
      this.ck_zaixinzf.setChecked(false);
      this.ck_weixin.setChecked(false);
      this.ck_zhifubao.setChecked(false);
      this.ck_zhifubao2.setChecked(false);
      this.ck_zhifubao3.setChecked(false);
      this.ck_weixin3.setChecked(false);
      this.ck_zaixinzf2.setChecked(true);
      return;
    case 2131099795:
      if ((this.mLoginType.equals("2")) && (this.state == 1))
      {
        showNewuserRegisterPopwindow();
        return;
      }
      Intent localIntent7 = new Intent();
      localIntent7.setClass(getActivity(), GetZZZHlistActivity.class);
      localIntent7.putExtra("id", 2);
      localIntent7.putExtra("Ctype", "2");
      startActivity(localIntent7);
      return;
    case 2131099797:
      if ((this.mLoginType.equals("2")) && (this.state == 1))
      {
        showNewuserRegisterPopwindow();
        return;
      }
      Intent localIntent6 = new Intent(getActivity(), GetZZZHlistActivity.class);
      localIntent6.putExtra("Ctype", "3");
      localIntent6.putExtra("id", 3);
      startActivity(localIntent6);
      return;
    case 2131099799:
      if ((this.mLoginType.equals("2")) && (this.state == 1))
      {
        showNewuserRegisterPopwindow();
        return;
      }
      Intent localIntent5 = new Intent(getActivity(), GetZZZHlistActivity.class);
      localIntent5.putExtra("Ctype", "1");
      localIntent5.putExtra("id", 1);
      startActivity(localIntent5);
      return;
    case 2131099792:
    }
    if ((this.mLoginType.equals("2")) && (this.state == 1))
    {
      showNewuserRegisterPopwindow();
      return;
    }
    switch (this.zhifuType)
    {
    default:
      return;
    case 4:
      showyinlianPopwindow();
      return;
    case 7:
      Intent localIntent4 = new Intent(getActivity(), weixinpayActivity.class);
      localIntent4.putExtra("type", "zhifubao");
      localIntent4.putExtra("isZhifubao", this.isZhifuBao);
      localIntent4.putExtra("id", 7);
      localIntent4.putExtra("paytype", "7");
      localIntent4.putExtra("isWeixin", this.isWeixin);
      startActivity(localIntent4);
      return;
    case 6:
      Intent localIntent3 = new Intent(getActivity(), weixinpayActivity.class);
      localIntent3.putExtra("type", "weixin");
      localIntent3.putExtra("id", 6);
      localIntent3.putExtra("paytype", "6");
      localIntent3.putExtra("isZhifubao", this.isZhifuBao);
      localIntent3.putExtra("isWeixin", this.isWeixin);
      startActivity(localIntent3);
      return;
    case 5:
      showyinlianPopwindow();
      return;
    case 8:
      showyinlianPopwindow();
      return;
    case 9:
      Intent localIntent2 = new Intent(getActivity(), weixinpayActivity.class);
      localIntent2.putExtra("type", "zhifubao");
      localIntent2.putExtra("isZhifubao", this.isZhifuBao3);
      localIntent2.putExtra("paytype", "9");
      localIntent2.putExtra("id", 9);
      localIntent2.putExtra("isWeixin", this.isWeixin3);
      startActivity(localIntent2);
      return;
    case 10:
    }
    Intent localIntent1 = new Intent(getActivity(), weixinpayActivity.class);
    localIntent1.putExtra("type", "weixin");
    localIntent1.putExtra("paytype", "10");
    localIntent1.putExtra("id", 10);
    localIntent1.putExtra("isZhifubao", this.isZhifuBao3);
    localIntent1.putExtra("isWeixin", this.isWeixin3);
    startActivity(localIntent1);
  }

  public void onCreate(Bundle paramBundle)
  {
    super.onCreate(paramBundle);
    fragment = this;
  }

  public View onCreateView(LayoutInflater paramLayoutInflater, ViewGroup paramViewGroup, Bundle paramBundle)
  {
    this.contentView = paramLayoutInflater.inflate(2130903123, null);
    this.screenWidth = CustomApplication.app.displayMetrics.widthPixels;
    this.screenHeigth = CustomApplication.app.displayMetrics.heightPixels;
    this.mLoginType = CustomApplication.app.preferencesUtil.getValue(AppConstants.LOGIN_TYPE, "1");
    if (CustomApplication.app.userBaseBean != null)
      this.guid = CustomApplication.app.userBaseBean.getGuid();
    init();
    isFirst();
    getPayTypeList();
    getoauthuserstate();
    return this.contentView;
  }

  public void onDestroy()
  {
    super.onDestroy();
  }

  public void onPause()
  {
    super.onPause();
  }

  public void onResume()
  {
    super.onResume();
    if ((CustomApplication.app.isLogin) && (CustomApplication.app.userBaseBean != null))
    {
      this.payID = CustomApplication.app.userBaseBean.getPayId();
      this.guid = CustomApplication.app.userBaseBean.getGuid();
    }
    LogUtils.i(this.TAG, "payID:" + this.payID);
  }

  public SpannableString parseValueColor(String paramString)
  {
    SpannableString localSpannableString = new SpannableString(paramString);
    List localList = getBeginAndEnd(Pattern.compile("\\d+\\.\\d%"), paramString);
    if ((localList == null) || (localList.size() <= 0))
      localList = getBeginAndEnd(Pattern.compile("\\d%"), paramString);
    Iterator localIterator = localList.iterator();
    while (true)
    {
      if (!localIterator.hasNext())
        return localSpannableString;
      Map localMap = (Map)localIterator.next();
      int i = Integer.parseInt(localMap.get("BEGIN").toString());
      int j = Integer.parseInt(localMap.get("END").toString());
      localSpannableString.setSpan(new ForegroundColorSpan(getResources().getColor(2131165438)), i, j, 33);
    }
  }
}

/* Location:           C:\Users\user\Desktop\dd28_pcdd720\classes_dex2jar.jar
 * Qualified Name:     com.hsc.yalebao.tabChongZhi.ChongZhiFragment
 * JD-Core Version:    0.6.2
 */